// 类模板基础
#include <iostream>
using namespace std;
template<class NameType, class AgeType = int>
class Person
{
public:
    NameType m_name;
    AgeType m_age;
    Person(NameType name, AgeType age)
    {
        this->m_name = name;
        this->m_age = age;
    }
    void showPerson()
    {
        cout << this->m_name << endl;
        cout << this->m_age << endl;
    }
};
void test1()
{
    Person<string, int> p1("lxy", 19);
    p1.showPerson();
    Person<string, string> p2("lxy", "20");
    p2.showPerson();
    Person<string> p3("lxy", 21);
    p3.showPerson();
}
int main(void)
{
    test1();

    return 0;
}